<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改密码</title>
	<link href="${ctxPath}/static/theme/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${ctxPath}/static/theme/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    
    <link href="${ctxPath}/static/theme/css/animate.css" rel="stylesheet">
    <link href="${ctxPath}/static/theme/css/style.css?v=4.1.0" rel="stylesheet">
    
    <script src="${ctxPath}/static/theme/js/jquery.min.js?v=2.1.4"></script>
    <script src="${ctxPath}/static/theme/js/jquery.form.js"></script>
</head>
<body>
  <div class="ibox">
    <div class="ibox-title">
      <h5>修改密码</h5>
      <div class="ibox-tools">
			<a title="修改信息" href="${ctxPath}/route/userList" class="btn btn-primary btn-xs"><i class="fa fa-reply"></i></a>
      </div>
    </div>
    <div class="ibox-content">
     <form class="form-horizontal m-t" id="change_pwd" action="${ctxPath}/user/savePwd" method="post">
        <div class="form-group">
          <label class="col-sm-1 control-label">用户名称：</label>
          <div class="col-sm-5">
          	<input type="hidden" name="id" value="${user.id}" >
            <input type="text" name="name" value="${user.name}" class="form-control" readonly placeholder="请输入用户名称">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-1 control-label">登录名：</label>
          <div class="col-sm-5">
            <input type="text" name="loginId" value="${user.loginId}" class="form-control" readonly placeholder="请输入登录名">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-1 control-label">原密码：</label>
          <div class="col-sm-3">
            <input type="password" name="password" class="form-control" placeholder="请输入原密码">
          </div>
        </div>
      
       <div class="form-group">
          <label class="col-sm-1 control-label">新密码：</label>
          <div class="col-sm-3">
            <input type="password" name="nowpassword1" class="form-control" placeholder="请输入新密码">
          </div>
        </div>
          <div class="form-group">
          <label class="col-sm-1 control-label">确认密码：</label>
          <div class="col-sm-3">
            <input type="password" name="nowpassword2" class="form-control" placeholder="请输再次输入新密码">
          </div>
        </div>
       
        <div class="form-group">
          <hr>
          <div class="col-sm-12 col-sm-offset-3">
            <button class="btn btn-primary" type="submit" id="submit-btn">修改</button>
            <a class="btn btn-white goback-btn">取消</a>
          </div>
        </div>
      </form>
    </div>
  </div>
  <script type="text/javascript">
  $(function(){

	  $("#change_pwd").ajaxForm({
          dataType: "json",
          beforeSend: function() {
          },
          uploadProgress: function(event, position, total, percentComplete) {
          },
          success: function() {
          },
          complete: function(xhr) {
              var data = xhr.responseText;
              data = JSON.parse(data);
              if (data.flag){
            	 window.location="http://localhost:8085/xxl-sso-server";
              } else{
              	alert(data.msg);
              }
          }
      });
	})
 
  </script>
</body>
</html>